#ifndef VALUES_H
#define VALUES_H

#include <vector>
#include <string>

#include <generik/tracing.h>

struct values
{
	std::vector<int> _values;
	
	values(const std::string& str)
	{
		REM_GENERIK_TRACER;
		size_t a = 0, b = 0;
		while (true)
		{
			b = str.find_first_of(',', a);
			//GENERIK_TRACE("a: "<<a<<", b: "<<b);
			if (b == std::string::npos)
			{
				_values.push_back(atoi(str.substr(a).c_str()));
				break;
			}
			if (b > a)
			{
				_values.push_back(atoi(str.substr(a, b-a+1).c_str()));
			}
			a = b+1;
		}
		GENERIK_TRACE("found "<<_values.size()<<" values in the string");
	}
};


#endif

